package com.bf.electroplating.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 企业排污口监测数据表
 *
 * @author system
 * @since 2025-01-11
 */
@Getter
@Setter
@TableName("enterprise_outfall_monitoring_data")
@Schema(description = "企业排污口监测数据表")
public class EnterpriseOutfallMonitoringData implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "排污口ID")
    @TableField("outfall_id")
    private Long outfallId;

    @Schema(description = "排污口编号")
    @TableField("outfall_code")
    private String outfallCode;

    @Schema(description = "企业ID")
    @TableField("enterprise_id")
    private Long enterpriseId;

    @Schema(description = "企业名称")
    @TableField("enterprise_name")
    private String enterpriseName;

    @Schema(description = "监测时间")
    @TableField("monitoring_time")
    private LocalDateTime monitoringTime;

    @Schema(description = "数据时间")
    @TableField("data_time")
    private LocalDateTime dataTime;

    // ==================== COD（w21001）相关字段 ====================
    @Schema(description = "COD最小值(mg/L)")
    @TableField("cod_min")
    private BigDecimal codMin;

    @Schema(description = "COD最大值(mg/L)")
    @TableField("cod_max")
    private BigDecimal codMax;

    @Schema(description = "COD平均值(mg/L)")
    @TableField("cod_avg")
    private BigDecimal codAvg;

    @Schema(description = "COD累积值")
    @TableField("cod_cou")
    private BigDecimal codCou;

    @Schema(description = "COD标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("cod_flag")
    private String codFlag;

    // ==================== 氨氮（w21003）相关字段 ====================
    @Schema(description = "氨氮最小值(mg/L)")
    @TableField("ammonia_nitrogen_min")
    private BigDecimal ammoniaNitrogenMin;

    @Schema(description = "氨氮最大值(mg/L)")
    @TableField("ammonia_nitrogen_max")
    private BigDecimal ammoniaNitrogenMax;

    @Schema(description = "氨氮平均值(mg/L)")
    @TableField("ammonia_nitrogen_avg")
    private BigDecimal ammoniaNitrogenAvg;

    @Schema(description = "氨氮累积值")
    @TableField("ammonia_nitrogen_cou")
    private BigDecimal ammoniaNitrogenCou;

    @Schema(description = "氨氮标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("ammonia_nitrogen_flag")
    private String ammoniaNitrogenFlag;

    // ==================== 总磷（w21011）相关字段 ====================
    @Schema(description = "总磷最小值(mg/L)")
    @TableField("total_phosphorus_min")
    private BigDecimal totalPhosphorusMin;

    @Schema(description = "总磷最大值(mg/L)")
    @TableField("total_phosphorus_max")
    private BigDecimal totalPhosphorusMax;

    @Schema(description = "总磷平均值(mg/L)")
    @TableField("total_phosphorus_avg")
    private BigDecimal totalPhosphorusAvg;

    @Schema(description = "总磷累积值")
    @TableField("total_phosphorus_cou")
    private BigDecimal totalPhosphorusCou;

    @Schema(description = "总磷标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("total_phosphorus_flag")
    private String totalPhosphorusFlag;

    // ==================== 总氮（w21002）相关字段 ====================
    @Schema(description = "总氮最小值(mg/L)")
    @TableField("total_nitrogen_min")
    private BigDecimal totalNitrogenMin;

    @Schema(description = "总氮最大值(mg/L)")
    @TableField("total_nitrogen_max")
    private BigDecimal totalNitrogenMax;

    @Schema(description = "总氮平均值(mg/L)")
    @TableField("total_nitrogen_avg")
    private BigDecimal totalNitrogenAvg;

    @Schema(description = "总氮累积值")
    @TableField("total_nitrogen_cou")
    private BigDecimal totalNitrogenCou;

    @Schema(description = "总氮标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("total_nitrogen_flag")
    private String totalNitrogenFlag;

    // ==================== 总铜（w20122）相关字段 ====================
    @Schema(description = "总铜最小值(mg/L)")
    @TableField("total_copper_min")
    private BigDecimal totalCopperMin;

    @Schema(description = "总铜最大值(mg/L)")
    @TableField("total_copper_max")
    private BigDecimal totalCopperMax;

    @Schema(description = "总铜平均值(mg/L)")
    @TableField("total_copper_avg")
    private BigDecimal totalCopperAvg;

    @Schema(description = "总铜累积值")
    @TableField("total_copper_cou")
    private BigDecimal totalCopperCou;

    @Schema(description = "总铜标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("total_copper_flag")
    private String totalCopperFlag;

    // ==================== 总铬（w20125）相关字段 ====================
    @Schema(description = "总铬最小值(mg/L)")
    @TableField("total_chromium_min")
    private BigDecimal totalChromiumMin;

    @Schema(description = "总铬最大值(mg/L)")
    @TableField("total_chromium_max")
    private BigDecimal totalChromiumMax;

    @Schema(description = "总铬平均值(mg/L)")
    @TableField("total_chromium_avg")
    private BigDecimal totalChromiumAvg;

    @Schema(description = "总铬累积值")
    @TableField("total_chromium_cou")
    private BigDecimal totalChromiumCou;

    @Schema(description = "总铬标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("total_chromium_flag")
    private String totalChromiumFlag;

    // ==================== 总锌（w20123）相关字段 ====================
    @Schema(description = "总锌最小值(mg/L)")
    @TableField("total_zinc_min")
    private BigDecimal totalZincMin;

    @Schema(description = "总锌最大值(mg/L)")
    @TableField("total_zinc_max")
    private BigDecimal totalZincMax;

    @Schema(description = "总锌平均值(mg/L)")
    @TableField("total_zinc_avg")
    private BigDecimal totalZincAvg;

    @Schema(description = "总锌累积值")
    @TableField("total_zinc_cou")
    private BigDecimal totalZincCou;

    @Schema(description = "总锌标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("total_zinc_flag")
    private String totalZincFlag;

    // ==================== PH（w01001）相关字段 ====================
    @Schema(description = "PH最小值")
    @TableField("ph_min")
    private BigDecimal phMin;

    @Schema(description = "PH最大值")
    @TableField("ph_max")
    private BigDecimal phMax;

    @Schema(description = "PH平均值")
    @TableField("ph_avg")
    private BigDecimal phAvg;

    @Schema(description = "PH累积值")
    @TableField("ph_cou")
    private BigDecimal phCou;

    @Schema(description = "PH标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("ph_flag")
    private String phFlag;

    // ==================== 流量（w01018）相关字段 ====================
    @Schema(description = "流量最小值(m³/h)")
    @TableField("flow_rate_min")
    private BigDecimal flowRateMin;

    @Schema(description = "流量最大值(m³/h)")
    @TableField("flow_rate_max")
    private BigDecimal flowRateMax;

    @Schema(description = "流量平均值(m³/h)")
    @TableField("flow_rate_avg")
    private BigDecimal flowRateAvg;

    @Schema(description = "流量累积值(m³)")
    @TableField("flow_rate_cou")
    private BigDecimal flowRateCou;

    @Schema(description = "流量标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("flow_rate_flag")
    private String flowRateFlag;

    // ==================== 总镍（w20121）相关字段 ====================
    @Schema(description = "总镍最小值(mg/L)")
    @TableField("total_nickel_min")
    private BigDecimal totalNickelMin;

    @Schema(description = "总镍最大值(mg/L)")
    @TableField("total_nickel_max")
    private BigDecimal totalNickelMax;

    @Schema(description = "总镍平均值(mg/L)")
    @TableField("total_nickel_avg")
    private BigDecimal totalNickelAvg;

    @Schema(description = "总镍累积值")
    @TableField("total_nickel_cou")
    private BigDecimal totalNickelCou;

    @Schema(description = "总镍标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("total_nickel_flag")
    private String totalNickelFlag;

    // ==================== 六价铬（w20117）相关字段 ====================
    @Schema(description = "六价铬最小值(mg/L)")
    @TableField("chromium_6_min")
    private BigDecimal chromium6Min;

    @Schema(description = "六价铬最大值(mg/L)")
    @TableField("chromium_6_max")
    private BigDecimal chromium6Max;

    @Schema(description = "六价铬平均值(mg/L)")
    @TableField("chromium_6_avg")
    private BigDecimal chromium6Avg;

    @Schema(description = "六价铬累积值")
    @TableField("chromium_6_cou")
    private BigDecimal chromium6Cou;

    @Schema(description = "六价铬标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("chromium_6_flag")
    private String chromium6Flag;

    // ==================== 总氰化物（w20120）相关字段 ====================
    @Schema(description = "总氰化物最小值(mg/L)")
    @TableField("total_cyanide_min")
    private BigDecimal totalCyanideMin;

    @Schema(description = "总氰化物最大值(mg/L)")
    @TableField("total_cyanide_max")
    private BigDecimal totalCyanideMax;

    @Schema(description = "总氰化物平均值(mg/L)")
    @TableField("total_cyanide_avg")
    private BigDecimal totalCyanideAvg;

    @Schema(description = "总氰化物累积值")
    @TableField("total_cyanide_cou")
    private BigDecimal totalCyanideCou;

    @Schema(description = "总氰化物标志位：N-正常,D-双信号,C-修正,S-停运,M-维护,F-故障,B-缺失,T-调试")
    @TableField("total_cyanide_flag")
    private String totalCyanideFlag;

    @Schema(description = "数据质量：GOOD-良好，SUSPICIOUS-可疑，BAD-异常")
    @TableField("data_quality")
    private String dataQuality;

    @Schema(description = "数据来源：AUTO-自动监测，MANUAL-手工录入，IMPORT-导入")
    @TableField("data_source")
    private String dataSource;

    @Schema(description = "数据是否有效：1-有效，0-无效")
    @TableField("is_valid")
    private Boolean isValid;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
